﻿<div class="user-right pay-index">
    <div class="conbox">
        <h2 class="form-title">填写留言内容</h2>

        <table class="table-message">
            <tr>
                <th>类型</th>
                <td>
                    <select class="sel-b" id="MessageTypeId">
                        <option value="0">请选择留言类型</option>
                        <option value="1">配资问题</option>
                        <option value="2">账户充值及提款问题</option>
                        <option value="3">配资开户及完结问题</option>
                        <option value="4">HOMS交易问题</option>
                        <option value="5">我要投诉</option>
                        <option value="6">意见反馈</option>
                        <option value="7">其他问题</option>
                    </select>
                </td>
            </tr>
            <tr>
                <th>内容</th>
                <td>
                    <textarea class="textarea" id="MessageInfo"></textarea>
                </td>
            </tr>
            <tr>
                <th></th>
                <td style="text-align: center;">
                    <input type="button" id="Submit" class="button red" value="提交"/>
                </td>
            </tr>
        </table>
    </div>
</div>
<script type="text/javascript">
    $(function() {
        $("#Submit").bind("click", function () {
            var $MessageTypeId = $("#MessageTypeId");
            var $MessageInfo = $("#MessageInfo");
            var messageTypeId = $MessageTypeId.val();
            var messageInfo = $MessageInfo.val();
            if (messageTypeId == 0) {
                $.jalert("请选择留言类型");
                $MessageTypeId.focus();
                return;
            }
            if (!$.trim(messageInfo)) {
                $.jalert("请填写留言内容");
                $MessageInfo.focus();
                return;
            }
            $.jajax({
                url: "/user/PostMessager",
                params: { messageTypeId: messageTypeId, messageInfo: messageInfo },
                callback: function(ret) {
                    if (!ret) return;
                    $.jalert(ret.message);
                }
            });
        });
    });
</script>